package edu.nf.ch06;

import edu.nf.ch06.entity.Phone;
import edu.nf.ch06.entity.Subject;
import edu.nf.ch06.entity.User;
import edu.nf.ch06.service.UserService;

/**
 * @author wangl
 * @date 2025/4/24
 */
public class Main {

    public static void main(String[] args) {
        UserService service = new UserService();
        User user = service.getUser(1);
        System.out.println(user.getName());
        System.out.println(user.getCard().getCnum());
        for(Phone phone : user.getPhones()) {
            System.out.println(phone.getPhone());
        }
        for(Subject subject : user.getSubjects()) {
            System.out.println(subject.getName());
        }
    }
}